-
Notifications
You must be signed in to change notification settings - Fork 78
Issue found in DPG modular generation - apiVersion parameter missing #3437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue in DPG modular generation where the apiVersion parameter was missing by correcting the logic for determining required parameters in client parameter generation.
Key changes:
- Restructured the condition logic in
isRequiredfunction to properly handle theapiVersionAsRequiredflag - Moved the apiVersion special case to the beginning of the condition to ensure it takes precedence
- Added a comprehensive test case for Azure Analytics Purview DataMap service to validate the fix
Reviewed Changes
Copilot reviewed 6 out of 48 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/typespec-ts/src/modular/helpers/clientHelpers.ts | Fixed parameter requirement logic to properly handle apiVersionAsRequired flag |
| packages/typespec-test/test/Azure.Analytics.Purview.DataMap/tspconfig.yaml | Added TypeSpec configuration for new test case |
| packages/typespec-test/test/Azure.Analytics.Purview.DataMap/spec/routes.tsp | Added comprehensive route definitions for DataMap service test |
| packages/typespec-test/test/Azure.Analytics.Purview.DataMap/spec/models.tsp | Added model definitions for DataMap service test |
| packages/typespec-test/test/Azure.Analytics.Purview.DataMap/spec/main.tsp | Added main service definition for DataMap test |
| packages/typespec-test/test/Azure.Analytics.Purview.DataMap/spec/client.tsp | Added client customizations for DataMap test |
|
The previous logic was to always return |
packages/typespec-test/test/Azure.Analytics.Purview.DataMap/spec/routes.tsp
Outdated
Show resolved
Hide resolved
packages/typespec-ts/test/modularUnit/scenarios/clientContext/optionalApiVersion.md
Outdated
Show resolved
Hide resolved
|
We offline synced this and we think for Azure services api-version would be a required parameter by convention so we could ignore the optionality definition no matter it is defined in spec side. |
fixes #3438
